\section{Appendix}
\subsection{Complete Arithmetic Results}
This section contains tables for all of the arithmetic tests run for this project. The tables contain detailed statistics for each experiment.

\begin{table}[h]
\centering
\begin{tabular}{|c|c||c|c|c|}
\hline
Library & Statistic & Test 0 & Test 1 & Test 2 \\ 
\hline \hline 
Naive & Avg. MB/s & 31.4 & 31.4  & 32.1 \\ 
No GPU & Std. Deviation & 0.2 & 0.2  & 0.2 \\ \hline 
Tables & & & & \\ 
No GPU & Avg. MB/s & 205.7 & 205.6  & 167.9  \\ 
Not Optimized & Std. Deviation & 1.2  &1.3   & 1.1  \\ \hline 
Tables & & & & \\
No GPU & Avg. MB/s & 944.9 & 937.2  & 571.4  \\ 
Optimized & Std. Deviation & 6.0 & 6.1  & 3.7  \\ \hline 
Tables & Avg. MB/s & 648.6 & 649.3  & 554.2  \\ 
GPU & Std. Deviation & 1.9 & 2.1  & 1.8  \\ \hline 
No Tables & Avg. MB/s & 260.4 & 260.7  & 252.9  \\ 
GPU & Std. Deviation & 2.4 & 2.7  & 2.6  \\ \hline 
\end{tabular} 
\caption{All Arithmetic Test Results for $w = 8$} 
\label{tab:AT8.txt} 
\end{table} 

\begin{table}[h]
\centering
\begin{tabular}{|c|c||c|c|c|}
\hline
Library & Statistic & Test 0 & Test 1 & Test 2 \\ 
\hline \hline 
Naive & Avg. MB/s & 30.4 & 30.4  & 29.4 \\ 
No GPU & Std. Deviation & 0.2 & 0.2  & 0.2 \\ \hline 
No Tables & & & & \\ 
No GPU & Avg. MB/s & 180.1 & 179.3  & 128.3  \\ 
Not Optimized & Std. Deviation & 0.9  &0.9   & 0.8  \\ \hline 
Tables & & & & \\ 
No GPU & Avg. MB/s & 461.9 & 457.0  & 416.5  \\ 
Optimized & Std. Deviation & 3.4 & 3.3  & 2.8  \\ \hline 
Tables & Avg. MB/s & 489.8 & 490.0  & 434.9  \\ 
GPU & Std. Deviation & 0.3 & 0.5  & 0.5  \\ \hline 
Tables & Avg. MB/s & 461.9 & 457.0  & 416.5  \\ 
GPU & Std. Deviation & 3.4 & 3.3  & 2.8  \\ \hline 
No Tables & Avg. MB/s & 243.7 & 243.8  & 243.3  \\ 
GPU & Std. Deviation & 2.4 & 2.2  & 2.6  \\ \hline 
\end{tabular} 
\caption{All Arithmetic Test Results for $w = 16$} 
\label{tab:AT16.txt} 
\end{table}

\begin{table}[h]
\centering
\begin{tabular}{|c|c||c|c|c|}
\hline
Library & Statistic & Test 0 & Test 1 & Test 2 \\ 
\hline \hline 
Naive & Avg. MB/s & 6.1 & 6.1  & 5.5 \\ 
No GPU & Std. Deviation & 0.0 & 0.0  & 0.0 \\ \hline 
No Tables & & & & \\ 
No GPU & Avg. MB/s & 34.8 & 34.7  & 34.6  \\ 
Not Optimized & Std. Deviation & 0.2  &0.2   & 0.3  \\ \hline 

Tables & & & & \\
No GPU & Avg. MB/s & 162.8 & 162.7  & 161.7  \\ 
Optimized & Std. Deviation & 1.1 & 1.1  & 1.3  \\ \hline  

Tables & Avg. MB/s & 237.9 & 237.7  & 226.8  \\ 
GPU & Std. Deviation & 2.0 & 2.4  & 1.9  \\ \hline 

No Tables & Avg. MB/s & 194.4 & 194.4  & 187.7  \\ 
GPU & Std. Deviation & 1.6 & 1.8  & 2.0  \\ \hline 
\end{tabular} 
\caption{All Arithmetic Test Results for $w = 32$} 
\label{tab:AT32.txt} 
\end{table} 

\clearpage

\subsection{Complete Encoding and Decoding Results}

This section contains tables and figures for all of the encoding and decoding results run for this project. The tables contain detailed statistics for each experiment, and the figures display the results graphically. 

\begin{table}[h]
\centering
\begin{tabular}{|c||c|c|c|c|}
\hline
Library & Average & Std & Average & Std \\ 
Type & Arithmetic & Devition & Total & Deviation \\ 
\hline \hline 
Tables, No GPU & & & & \\ 
Non-Optimized & 91.9 & 43.3 & 68.3 & 32.2 \\ \hline 
Tables, GPU & & & & \\ 
Optimized & 393.0 & 147.4 & 146.9 & 71.4 \\ \hline 
Tables& & & & \\ 
GPU & 306.2 & 111.2 & 129.3 & 58.3 \\ \hline 
No Tables & & & & \\ 
GPU & 229.0 & 28.6 & 109.8 & 35.0 \\ \hline 
\end{tabular} 
\caption{All Decoding Results} 
\label{tab:AD.txt} 
\end{table} 

\begin{table}[h]
\centering
\begin{tabular}{|c||c|c|c|c|}
\hline
Library & Average & Std & Average & Std \\ 
Type & Arithmetic & Devition & Total & Deviation \\ 
\hline \hline 
Tables, No GPU & & & & \\ 
Non-Optimized & 104.6 & 49.2 & 43.5 & 18.8 \\ \hline 
Tables, GPU & & & & \\ 
Optimized & 444.8 & 163.5 & 78.5 & 26.1 \\ \hline 
Tables& & & & \\ 
GPU & 372.0 & 114.2 & 86.2 & 36.1 \\ \hline 
No Tables & & & & \\ 
GPU & 202.4 & 24.0 & 70.8 & 24.2 \\ \hline 
\end{tabular} 
\caption{All Encoding Results} 
\label{tab:AE.txt} 
\end{table} 

\begin{table}[h]
\centering
\begin{tabular}{|c||c|c|c|c|}
\hline
Library & Average & Std & Average & Std \\ 
Type & Arithmetic & Devition & Total & Deviation \\ 
\hline \hline 
Tables, No GPU & & & & \\ 
Non-Optimized & 105.0 & 1.6 & 73.7 & 2.3 \\ \hline 
Tables, GPU & & & & \\ 
Optimized & 376.1 & 6.6 & 126.0 & 5.7 \\ \hline 
Tables& & & & \\ 
GPU & 345.4 & 2.1 & 120.3 & 9.4 \\ \hline 
No Tables & & & & \\ 
GPU & 243.4 & 2.1 & 104.7 & 3.2 \\ \hline 
\end{tabular} 
\caption{All Decoding Results for $w = 16$} 
\label{tab:D16.txt} 
\end{table} 

\begin{table}[h]
\centering
\begin{tabular}{|c||c|c|c|c|}
\hline
Library & Average & Std & Average & Std \\ 
Type & Arithmetic & Devition & Total & Deviation \\ 
\hline \hline 
Tables, No GPU & & & & \\ 
Non-Optimized & 27.7 & 0.4 & 23.0 & 0.5 \\ \hline 
Tables, GPU & & & & \\ 
Optimized & 220.7 & 3.6 & 75.9 & 7.6 \\ \hline 
Tables& & & & \\ 
GPU & 137.5 & 0.5 & 62.4 & 4.5 \\ \hline 
No Tables & & & & \\ 
GPU & 185.7 & 1.3 & 70.6 & 3.5 \\ \hline 
\end{tabular} 
\caption{All Decoding Results for $w = 32$} 
\label{tab:D32.txt} 
\end{table} 

\begin{table}[h]
\centering
\begin{tabular}{|c||c|c|c|c|}
\hline
Library & Average & Std & Average & Std \\ 
Type & Arithmetic & Devition & Total & Deviation \\ 
\hline \hline 
Tables, No GPU & & & & \\ 
Non-Optimized & 140.4 & 1.9 & 108.6 & 2.8 \\ \hline 
Tables, GPU & & & & \\ 
Optimized & 618.2 & 10.5 & 259.1 & 12.8 \\ \hline 
Tables& & & & \\ 
GPU & 420.7 & 2.4 & 217.1 & 5.9 \\ \hline 
No Tables & & & & \\ 
GPU & 255.0 & 0.9 & 156.5 & 15.9 \\ \hline 
\end{tabular} 
\caption{All Decoding Results for $w = 8$} 
\label{tab:D8.txt} 
\end{table} 

\begin{table}[h]
\centering
\begin{tabular}{|c||c|c|c|c|}
\hline
Library & Average & Std & Average & Std \\ 
Type & Arithmetic & Devition & Total & Deviation \\ 
\hline \hline 
Tables, No GPU & & & & \\ 
Non-Optimized & 120.0 & 1.9 & 45.1 & 1.3 \\ \hline 
Tables, GPU & & & & \\ 
Optimized & 438.6 & 8.2 & 83.9 & 5.5 \\ \hline 
Tables& & & & \\ 
GPU & 402.4 & 4.8 & 76.7 & 11.0 \\ \hline 
No Tables & & & & \\ 
GPU & 204.7 & 1.2 & 68.0 & 5.4 \\ \hline 
\end{tabular} 
\caption{All Encoding Results for $w = 16$} 
\label{tab:E16.txt} 
\end{table} 

\begin{table}[h]
\centering
\begin{tabular}{|c||c|c|c|c|}
\hline
Library & Average & Std & Average & Std \\ 
Type & Arithmetic & Devition & Total & Deviation \\ 
\hline \hline 
Tables, No GPU & & & & \\ 
Non-Optimized & 31.4 & 0.4 & 18.4 & 0.5 \\ \hline 
Tables, GPU & & & & \\ 
Optimized & 242.9 & 3.9 & 45.7 & 7.2 \\ \hline 
Tables& & & & \\ 
GPU & 204.9 & 1.2 & 50.2 & 4.4 \\ \hline 
No Tables & & & & \\ 
GPU & 170.4 & 0.9 & 44.6 & 5.6 \\ \hline 
\end{tabular} 
\caption{All Encoding Results for $w = 32$} 
\label{tab:E32.txt} 
\end{table} 

\begin{table}[h]
\centering
\begin{tabular}{|c||c|c|c|c|}
\hline
Library & Average & Std & Average & Std \\ 
Type & Arithmetic & Devition & Total & Deviation \\ 
\hline \hline 
Tables, No GPU & & & & \\ 
Non-Optimized & 159.8 & 2.5 & 69.6 & 6.9 \\ \hline 
Tables, GPU & & & & \\ 
Optimized & 689.0 & 13.8 & 114.8 & 26.8 \\ \hline 
Tables& & & & \\ 
GPU & 502.7 & 4.2 & 137.8 & 17.2 \\ \hline 
No Tables & & & & \\ 
GPU & 234.3 & 1.0 & 102.0 & 14.2 \\ \hline 
\end{tabular} 
\caption{All Encoding Results for $w = 8$} 
\label{tab:E8.txt} 
\end{table} 

\clearpage
\begin{figure} 
\centering 
\includegraphics[width = 2.40in]{../graphs/Encoding_DecodingTESTS/ADAP.png} 
\caption{All Decoding Results -- Arithmetic Performance} 
\label{} 
\end{figure} 
 
\begin{figure} 
\centering 
\includegraphics[width = 2.40in]{../graphs/Encoding_DecodingTESTS/ADTP.png} 
\caption{All Decoding Results -- Total Performance} 
\label{} 
\end{figure} 
 
\begin{figure} 
\centering 
\includegraphics[width = 2.40in]{../graphs/Encoding_DecodingTESTS/AEAP.png} 
\caption{All Encoding Results -- Arithmetic Performance} 
\label{} 
\end{figure} 

\begin{figure} 
\centering 
\includegraphics[width = 2.40in]{../graphs/Encoding_DecodingTESTS/AETP.png} 
\caption{All Encoding Results -- Total Performance} 
\label{} 
\end{figure} 

\begin{figure}[h!] 
\centering 
\includegraphics[width = 2.40in]{../graphs/Encoding_DecodingTESTS/D16AP.png} 
\caption{Decoding Results for w = 16 -- Arithmetic Performance} 
\label{} 
\end{figure} 

\begin{figure} 
\centering 
\includegraphics[width = 2.40in]{../graphs/Encoding_DecodingTESTS/D16TP.png} 
\caption{Decoding Results for w = 16 -- Total Performance} 
\label{} 
\end{figure} 

\begin{figure} 
\centering 
\includegraphics[width = 2.40in]{../graphs/Encoding_DecodingTESTS/D32AP.png} 
\caption{Decoding Results for w = 32 -- Arithmetic Performance} 
\label{} 
\end{figure} 
 
\begin{figure} 
\centering 
\includegraphics[width = 2.40in]{../graphs/Encoding_DecodingTESTS/D32TP.png} 
\caption{Decoding Results for w = 32 -- Total Performance} 
\label{} 
\end{figure} 
 
\begin{figure} 
\centering 
\includegraphics[width = 2.40in]{../graphs/Encoding_DecodingTESTS/D8AP.png} 
\caption{Decoding Results for w = 8 -- Arithmetic Performance} 
\label{} 
\end{figure} 
 
\begin{figure} 
\centering 
\includegraphics[width = 2.40in]{../graphs/Encoding_DecodingTESTS/D8TP.png} 
\caption{Decoding Results for w = 8 -- Total Performance} 
\label{} 
\end{figure} 
 
\begin{figure} 
\centering 
\includegraphics[width = 2.40in]{../graphs/Encoding_DecodingTESTS/E16AP.png} 
\caption{Encoding Results for w = 16 -- Arithmetic Performance} 
\label{} 
\end{figure} 
 
\begin{figure} 
\centering 
\includegraphics[width = 2.40in]{../graphs/Encoding_DecodingTESTS/E16TP.png} 
\caption{Encoding Results for w = 16 -- Total Performance} 
\label{} 
\end{figure} 
 
\begin{figure} 
\centering 
\includegraphics[width = 2.40in]{../graphs/Encoding_DecodingTESTS/E32AP.png} 
\caption{Encoding Results for w = 32 -- Arithmetic Performance} 
\label{} 
\end{figure} 
 
\begin{figure} 
\centering 
\includegraphics[width = 2.40in]{../graphs/Encoding_DecodingTESTS/E32TP.png} 
\caption{Encoding Results for w = 32 -- Total Performance} 
\label{} 
\end{figure} 
 
\begin{figure} 
\centering 
\includegraphics[width = 2.40in]{../graphs/Encoding_DecodingTESTS/E8AP.png} 
\caption{Encoding Results for w = 8 -- Arithmetic Performance} 
\label{} 
\end{figure} 
 
\begin{figure} 
\centering 
\includegraphics[width = 2.40in]{../graphs/Encoding_DecodingTESTS/E8TP.png} 
\caption{Encoding Results for w = 8 -- Total Performance} 
\label{} 
\end{figure} 
\clearpage
\subsection{Source Code for GPU Library with Tables}

The following source code is an excerpt of the code for the library using both the GPU and table lookups.  It is \emph{not} the entire source code for the library, so it cannot be compiled and run in the given format.  The remainder of the source code is omitted to conserve space.

\input{gpu_tables_code.tex}

\subsection{Source Code for GPU Library without Tables}

The following source code is an excerpt of the code for the library using the GPU without the use of tables.  It is \emph{not} the entire source code for the library, so it cannot be compiled and run in the given format.  The remainder of the source code is omitted to conserve space.

\input{gpu_notables_code.tex}
 
 
 
